package com.artisan.booteventbus.config;

import com.artisan.booteventbus.service.MessageChannel;
import com.artisan.booteventbus.service.impl.EmailMessageChannel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

@Configuration
public class MessageChannelConfig {

    @Bean
    public List<MessageChannel> messageChannels() {
        List<MessageChannel> channels = new ArrayList<>();
        channels.add(new EmailMessageChannel());
        // 可以继续添加其他类型的通道
        return channels;
    }
}